<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
<script>
function answer(title,support,content,qid,id){
	$("#id").val(id);
	$("#qid").val(qid);
	$("#title").html(title);
	$("#support").val(support);
	$("#content").text($(content).children(0).val());
	add_class('修改回答','340','280','#answer_div','');
}
</script>
<title>后台管理</title>
</head>
<body class="body_ifm">
<div id="answer_div"  style="display:none;">
    <div id="infobox" style=" width:355px; margin-top:10px;" >
      <form name="myform" target="supportiframe" action="index.php?m=admin_question&c=save_answer" method="post" >
      <input type="hidden" name="pytoken" id='pytoken' value="{yun:}$pytoken{/yun}">
		<table cellspacing='1' cellpadding='1' class="admin_examine_table">
			<tr><th style="width:60px">所属问题：</th><td><span id="title" style="width:260px;height:30px; line-height:30px; text-overflow:ellipsis; overflow:hidden; white-space:nowrap; display:block"></span></td></tr>
			<tr><th>支持数：</th><td><input class="com_com_a_text" type="text" id="support" name="support" size="20" value="" /></td></tr>
			<tr><th>回答内容：</th><td><textarea id="content" name="content" style="width:250px;height:80px;border:1px solid #eee"></textarea></td></tr>
			<tr><th>&nbsp;</th><td align="left"> <input type="submit"  name="update" value='确认' class="admin_examine_bth">
          &nbsp;&nbsp;<input type="button" onClick="layer.closeAll();" class="admin_examine_bth_qx" value='取消'></td></tr>
		</table>
        <input type="hidden" name="id" id="id" value="" />
        <input type="hidden" name="qid" id="qid" value=""/>
      </form>
    </div> 
</div>
<div class="infoboxp">
<div class="admin_new_tip">
<a href="javascript:;" class="admin_new_tip_close"></a>
<a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
<div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
<div class="admin_new_tip_list_cont">
<div class="admin_new_tip_list">问答里的回答列表</div>
    
</div>
</div>


  <div class="tag_box mt10">
    <iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
    <form action="index.php" name="myform" method="get" target="supportiframe" id='myform'>
    <input type="hidden" name="pytoken" id="pytoken" value="{yun:}$pytoken{/yun}">

      <input name="m" value="admin_question" type="hidden"/>
      <input name="c" value="delanswer" type="hidden"/>
      <input name="qid" value="{yun:}$qid{/yun}" type="hidden"/>
      <table width="100%" class="table_form">
        <thead>
        <tr>
              <td colspan="8" bgcolor="#f0f6fb"><div class="admin_bold">回答列表</div></td>
            </tr>
          <tr>
            <th bgcolor="#f8f8f8" height="30"><label for="chkall">
              <input type="checkbox" id='chkAll'  onclick='CheckAll(this.form)'/>
              </label></th>
            <th bgcolor="#f8f8f8" align="center">编号</th>
            <th  bgcolor="#f8f8f8"align="center">内容</th>
            <th  bgcolor="#f8f8f8"align="center">回答者昵称</th>
            <th bgcolor="#f8f8f8"align="center">评论数</th>
            <th bgcolor="#f8f8f8"align="center">支持数</th>
            <th bgcolor="#f8f8f8"align="center">回答时间</th>
            <th bgcolor="#f8f8f8"align="center">操作</th>
          </tr>
        </thead>
        <tbody>
        
        {yun:}foreach item=v from=$all_answer{/yun}
        <tr align="center" id="list{yun:}$v.id{/yun}">
          <td height="36"><input type="checkbox" value="{yun:}$v.id{/yun}"  name='del[]' onclick='unselectall()' rel="del_chk" /></td>
          <td align="left" class="td1" style="text-align:center;"><span>{yun:}$v.id{/yun}</span></td>
          <td class="od" align="left">{yun:}$v.content|strip_tags|mb_substr:0:40:'utf-8'{/yun}</td>
          <td>{yun:}$v.username{/yun}</td>
          <td>{yun:}$v.comment{/yun}</td>
          <td>{yun:}$v.support{/yun}</td>
          <td class="td">{yun:}$v.add_time|date_format:"%Y-%m-%d  %H:%M:%S"{/yun}</td>
          <td>
          	{yun:}if $v.comment{/yun}
          		<a href="index.php?m=admin_question&c=getcomment&id={yun:}$v.id{/yun}"  class="admin_new_c_bth admin_new_c_bth_yl">查看</a>
          	{yun:}else{/yun}
          		<span style="color:#999; font-size:12px;">暂无评论</span>
          	{yun:}/if{/yun} 
          	<span style="cursor:pointer;" onClick="answer('{yun:}$ques.title{/yun}','{yun:}$v.support{/yun}',this,'{yun:}$ques.id{/yun}','{yun:}$v.id{/yun}')"  class="admin_new_c_bth admin_new_c_bth ">
            修改
          		<textarea class="hidden" name="quscontent">{yun:}$v.content{/yun}</textarea>
          		
          	</span>
            
            
            
          	<a href="javascript:void(0)" onClick="layer_del('确定要删除？', 'index.php?m=admin_question&c=delanswer&id={yun:}$v.id{/yun}&qid={yun:}$qid{/yun}');" class="admin_new_c_bth admin_new_c_bth_sc">删除</a></td>
        </tr>
        {yun:}/foreach{/yun}
        <tr style="background:#f1f1f1;">
       		<td align="center"><input type="checkbox" id='chkAll2' onclick='CheckAll2(this.form)' /></td>
			<td colspan="2" ><label for="chkAll2">全选</label>&nbsp;
          <input class="admin_button" type="button" name="delsub" value="删除所选" onClick="return really('del[]')" /></td>
          <td colspan="5" class="digg">{yun:}$pagenav{/yun}</td>
        </tr>
        </tbody>
        
      </table>
    </form>
  </div>
</div>
<style>
.table_form th{ text-align:center; font-weight:bold; background:#f8f8f8;height:30px;border-top:1px solid #DCE3ED}
</style>
</body>
</html>
